/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Business;

import DataAccess.CategoryDataAccess;
import DataAccess.EventDataAccess;
import Entities.CategoryEntities;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author vjphl
 */
@ManagedBean
@RequestScoped
public class CategoryBean {

    
    List<CategoryEntities> categoryEntitieses;
    /**
     * Creates a new instance of CategoryBean
     */
    public CategoryBean() {
        getAllCategory();
    }
    
    public void getAllCategory()
    {
        try {
            CategoryDataAccess categoryDataAccess = new CategoryDataAccess();
            categoryEntitieses = categoryDataAccess.getCategoryAll();
        } catch (Exception ex) {
            Logger.getLogger(EventBean.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    
    
    
    public List<CategoryEntities> getCategoryEntitieses() {
        return categoryEntitieses;
    }

    public void setCategoryEntitieses(List<CategoryEntities> categoryEntitieses) {
        this.categoryEntitieses = categoryEntitieses;
    }
}
